class CreateOrderCompanies < ActiveRecord::Migration
  def change
    create_table :order_companies do |t|
      t.references :order, :null => false
      t.string  :name,    :limit => 30, :null => false
      t.string  :ico,     :limit => 13, :null => false
      t.string  :dic,     :limit => 13, :null => true
      t.string  :phone,:limit => 16, :null => true
    end

    add_index :order_companies, :order_id
  end
end
